<?php
session_start();
include("../common/connect.php");
include("../common/common.php");

$zuid = CheckUrlParamNoDie("zuid");

if($zuid == "" || !isset($zuid))
{
	$url = "Location:../";
	header($url);
	exit;
}

$sql = "select type from daohang where zu=$zuid group by type order by zulei";
$result = mysql_query($sql);
//$sql ="";
//$sql .= "select id,url,title,type from daohang";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>购物兔导航页</title>
<link rel="stylesheet" type="text/css" href="../css/guid.css" />
<link type="text/css" rel="stylesheet" href="../css/global.css" />
<script type="text/javascript" src="css/common.js"></script>
</head>
<body>
<?php
	require("../hearss.php");
?>
<div id="bd" style="margin-top:10px;">
	<?php 
    while( $result && $row = mysql_fetch_assoc( $result ))
    {
    ?>
    <div class="mod-content clearfix" onmouseover="this.style.background='#f8fafc';" onmouseout="this.style.background='#fff';">
        <div class="content-con content-con-first">
            <h2 class="content-title"><?php echo $row["type"]; ?></h2>
            <ul class="content-link">
            <?php
			$sql = "select * from daohang where zu=$zuid and type='".$row["type"]."' and see>0 order by stem desc,zulei";
			$result1 = mysql_query($sql);
			$i = 0;
			while( $result1 && $row1 = mysql_fetch_assoc( $result1 ))
			{
		?>
        		<li class="">
                    <h3><div><a sid="<?php echo $row1["return"]; ?>"  target="_blank" href="<?php if($row1["trade"] == 1 && $row1["judge"] == 1){ echo $row1["url"]; }else if($row1["trade"] == 1){ echo 'http://www.gouwutu.com/new/s/shop.php?nick='.urlencode($row1["url"]); }else{ echo $row1["url"]; } ?>"><?php echo $row1["title"]; ?></a></div></h3>
                </li>
			<?php } ?>
            </ul>
        </div>
    </div>
    <?php
	 }
     ?>
</div>
<?php
require("../ft.php");
?>
</body>
</html>
<div align="center"><script src="http://s20.cnzz.com/stat.php?id=3557071&web_id=3557071&show=pic" language="JavaScript"></script></div>